[−][src]Crate radium
radium
provides a series of helper traits providing a uniform API for
interacting with both atomic types like
AtomicUsize
, and non-atomic types like Cell<T>
.
This crate is #![no_std]
-compatible, and uses no non-core types.
For details, see the documentation for Radium
.
Additionally, radium
exports type aliases that map to the atomic types in
core::sync::atomic
when they exist, and fall back to Cell
wrappers when
the atomic is missing. These are accessible through the types
module; you
can use these names for a guaranteed-portable symbol with best-effort atomic
behavior.
@kneecaw - https://twitter.com/kneecaw/status/1132695060812849154
Feelin' lazy: Has someone already written a helper trait abstracting operations over
AtomicUsize
andCell<usize>
for generic code which may not care about atomicity?
@ManishEarth - https://twitter.com/ManishEarth/status/1132706585300496384
no but call the crate radium
(since people didn't care that it was radioactive and used it in everything)
Modules
marker | Marker traits used by |
types | Best-effort atomic types |
Traits
Radium | A maybe-atomic shared mutable fundamental type |